<?php
/**
 * Author: 式神(vashi)
 * email: 289650682@qq.com
 * Date: 2019/1/25 14:00
 * FileName: Rule.php
 */

namespace app\common\validate;


use think\Validate;

class Role extends Validate
{
    protected  $rule=[
        'title|规则名'=>['require'],
        'name|路径'=>['require'],
    ];

    protected $message=[
        //'__token__.token' => ':attribute 无效！',
        'title.require' => ':attribute 不能为空！',
        'name.require' => ':attribute 不能为空！',
    ];

    protected $scene=[
        'create'=>['title'],   //创建验证
        'edit'=>['title'],
    ];
}